<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>


<h2 style="padding:10px;">
	&nbsp;&nbsp;来电号码：<label id="caller" style="color:red	">${caller
		}</label>
</h2>

<div class="header">
	<h2>客户信息</h2>
</div>
<table class=" form-table">
	<tbody>
		<tr>
			<td class="td1">人员：</td>
			<td class="td2">${cusUser.fullname }</td>

			<td class="td2" rowspan="6">
				<div>
					<textarea id="description" rows="8" style="width:92%"></textarea>
				</div>
				<div style="margin:2px auto;text-align: center;">
					<button class="nui-mainbtn" onclick="createNewIncident();">登记为新事件>></button>
				</div>
			</td>
		</tr>
		<tr>
			<td class="td1">所属客户：</td>
			<td class="td2">${cusUser.department_treenode_name_path }</td>
		</tr>
		 
		<tr>
			<td class="td1">类型：</td>
			<td class="td2"　>${cusUser.type}</td>
		</tr>
		<tr>
			<td class="td1">职位：</td>
			<td class="td2">${cusUser.title}</td>

		</tr>
		<tr>
			<td class="td1">48小时报障次数：</td>
			<td class="td2">${cuCount }</td>
		</tr>
</table>

<script type="text/javascript">
	function incidentGridActions(rowObject) {
		return isperp.createGridAction({
			title : '催办',
			iconCls : 'icon-notify',
			onclick : 'isperp.openDialog({title:"事件催办",windowSize:"normal",contentUrl:"app/message/sender/sendEdit?title=【催办】事件编号【' + rowObject.title + '】请速处理&sourceId=' + rowObject.id + '"})'
		});

	}
	function createNewIncident() {

		window.location.replace(isperp.webPath + "/incident/incident/newIncidentEdit?cusUserId=${cusUser.id}&description=" + $("#description").val());

	}
</script>
<div id="cusIncidentHistory">
	<div class="box no-border">
		<div class="header">
			<h3>用户历史事件（按时间顺序，抓出其历史的报障记录）</h3>
		</div>
		<isperp:grid
			url="incident/incident/listByCusUser?all=1&cusUserId=${cusUser.id }"
			showSearchbar="false" gridId="userIncidentHistoryGrid" rowNum="10"
			height="auto" showPager="true" cusFormatterActions="false" ondbClickRowEvent="userIncidentHistoryGrid.view(rowid)"
			showToolbar="false" cusViewUrl="incident/incident/view">
			<isperp:column name="id" title="id" hidden="true"></isperp:column>
			<isperp:column name="code" title="事件编号" width="100">
			</isperp:column>
			<isperp:column name="description" title="描述" width="300">
			</isperp:column>
			<isperp:column name="createDate" title="报障时间" width="120">
			</isperp:column>
			<isperp:column name="status" title="处理状态" width="65">
			</isperp:column>
			<isperp:column name="solverName" title="处理人" width="60"
				align="center">
			</isperp:column>
		</isperp:grid>
	</div>
</div>

